package stancel.peter.smartsilencer;

import java.io.Serializable;
import java.util.Calendar;

public class TimeAlarm implements Comparable<TimeAlarm>, Serializable{

	private static final long serialVersionUID = 8234178836088074111L;
	private Calendar date;
	private String name;
	private boolean oneTime;
	
	public TimeAlarm(Calendar date, String name, boolean oneTime) {
		this.date = date;
		this.name = name;
		this.oneTime = oneTime;
	}
	
	public Calendar getDate() {
		return date;
	}

	public String getName() {
		return name;
	}

	public boolean isOneTime() {
		return oneTime;
	}
	
	public void setDate(Calendar date) {
		this.date = date;
	}

	@Override
	public int compareTo(TimeAlarm o) {
		return this.date.compareTo(o.getDate());
	}

}
